#include<iostream>
#include<functional>


#include"Server.hpp"
#include"Command.hpp"

int main(int argn,char* argv[])
{
    if(2!=argn)
    {
        printf("Usage error:%s\nUsage: %s port\n",argv[0],argv[0]);
        exit(-1);
    }
    Command command;
    Server server(htons(std::stoi(argv[1])),std::bind(&Command::Execute,&command,placeholders::_1));
    server.Start();

    return 0;
}